260 PRINT" This program allows you to change ALL occurences of many strings to other strings in ALL files ending with the same extension."
270 PRINT:PRINT" Before starting this program you must have created TWO files, called DIR.EDT and $KEYWORD.2"
280 PRINT"Creating DIR.EDT is done in DOS by typing ";:COLOR 11,0:PRINT" DIR>DIR.EDT or DIR *.etc >DIR.EDT ":COLOR 3
290 PRINT"Creating $KEYWORD.2 is done by using any editor and it must contain two words per line, separated by a comma.":PRINT
300 PRINT" To have blanks in either the source or destination string, enclose that string with quotes - e.g. To replace FRED with FRED use the following input FRED,"+CHR$(34)" FRED "+CHR$(34):PRINT:PRINT
310 PRINT:COLOR 11:PRINT" If the two above do not exist, then type Q for the Source drive.":PRINT:COLOR 3
320 INPUT "Source drive (eg. C: ) ===> ";SOURCE$: IF SOURCE$="" THEN SOURCE$="C:" ELSE IF SOURCE$="Q" OR SOURCE$="q" THEN END
330 IF INSTR(SOURCE$,":") = 0 AND LEN(SOURCE$)= 1 THEN SOURCE$=SOURCE$+":"
340 INPUT "Destination drive (eg. D: ) ===> ";DEST$ : IF DEST$="" THEN DEST$="D:"
350 TXT$=DEST$:GOSUB 1100 :DEST$=TXT$ ' Convert to UPPER case
360 TXT$=SOURCE$:GOSUB 1100 :SOURCE$=TXT$ ' Convert to UPPER case
370 IF INSTR(DEST$,":") = 0 AND LEN(DEST$)= 1 THEN DEST$=DEST$+":"
380 INPUT "Extension to edit (eg. BAS) ===> ";REXT$: IF REXT$="" THEN REXT$="BAS"
390 TXT$=REXT$:GOSUB 1100 :REXT$=TXT$ ' Convert to UPPER case
400 IF SOURCE$=DEST$ THEN INPUT "Enter new extension (eg. ASC) ===> ";NREXT$: IF NREXT$="" THEN NREXT$="ASC"
410 TXT$=NREXT$:GOSUB 1100 :NREXT$=TXT$ ' Convert to UPPER case
420 IF SOURCE$=DEST$ THEN SAME=1
430 PRINT: PRINT "Do you wish to list All lines or only the Changed ones ( A or C* ) ";
440 Q$=INKEY$:IF Q$="" THEN 440 ELSE IF Q$="A" OR Q$="a" THEN ALL = 1
450 COLOR 10,0: PRINT TAB(10) " Press Q to quit at any time ":PRINT:COLOR 2,0
460 ON ERROR GOTO 1210
470 OPEN "I", 1 , "$KEYWORD.2":GOSUB 1160
480 OPEN "I",1,SOURCE$+"DIR.EDT"
490 FOR J! = 1 TO 3
500 LINE INPUT #1,RECORD$
510 NEXT J!
520 NF% = 0
530 '
540 WHILE NOT EOF(1)
550 LINE INPUT #1,RECORD$ :IF LEN(RECORD$)<2 THEN 550
560 Q$=INKEY$:IF Q$="" THEN 570 ELSE IF Q$="Q" OR Q$="q" THEN 1050
570 GOSUB 900 ' extract filename
580 IF OK% = 0 THEN 860
590 IF IGNORE% = 1 THEN 860
600 IF MID$( FILENAME$,1,1 ) = "." THEN CLOSE:GOTO 9999